Ext.define('DCApp.view.relic.Detail', {
    extend: 'DCApp.view.Detail',
    alias: 'widget.relicdetail',
    
    requires: ['DCApp.ux.ComboTree','Ext.form.field.Tag'],
    
    bind: {
        title: '藏品 - 【{theObj.objId}】'
    },
    
    tbar: ['->',{
    	text:'>>>显示更多',
    	handler:'onMore'
    },{
        text: '上一条',
        handler: 'onPrev',
        bind: {
            hidden: '{!showprev}'
        }
    },{
        text: '下一条',
        handler: 'onNext',
        bind: {
            hidden: '{!shownext}'
        }
    },{
        text: '保存',
        handler: 'onSaveClick',
        bind: {
            hidden: '{!showsave}'
        }
    },{
        text: '返回',
        handler: 'onBackClick',
        bind: {
            hidden: '{!showreturn}'
        }
    }],
    
    componentCls: 'relic-detail',
    
    controller: 'detail',
    
    moreItems:[{
		title : '相关文稿',
		margin : '0 0 10 0',
		cls : 'nav_pos',
		layout : 'fit',
		items : [
			{
				bind: '{theObj.docs}',
				xtype : 'doclist',
				plugins: null,
			 	tbar: ['->',{
			        text: '关联',
			        handler: 'onRelList'
			    },{
			        text: '删除',
			        handler: 'onRelDel' 
			    }]
			}
		]							
	}],
    afterRender: function(ct, position) {
    	var imgpanel = this.down('imgpanel');
    	if(imgpanel){
	    	var tb = imgpanel.down('toolbar[dock=top]');
	    	tb.insert(1,[{
	    		text:'插入'
	    	}]);
    	}
    	var attachpanel = this.down('attachpanel');
    	if (attachpanel) {
	    	var tb = attachpanel.down('toolbar[dock=top]');
	    	tb.insert(1,[{
	    		text:'插入'
	    	}]);
    	}
    	this.callParent();
    },
    items: [{
    	listeners: {
		  render: function(p){
			p = p.getEl();
			var me= this.up();
			me.h0=p.getHeight();
		    p.on('scroll', function(e, t){
		    	me.onscroll(t.scrollTop,t.clientHeight);
		    }, p);
		  }
		},
    	title: 'Panel 0',    
    	padding:'0 0 50 0',  	
        flex: 2,
        frame: false,
        xtype: 'container',
        layout: 'anchor',
        style: {
            overflow: 'auto'
        },
        items: [
                		{
							title : '文物信息',
							margin : '0 0 10 0',
							cls : 'nav_pos',
							reference : 'form',
							bodyPadding : 10,
							fieldDefaults : {
								labelAlign : 'right',
								labelWidth : 100,
								padding : 3
							},
							defaults : {
								anchor : '100%'
							},
							xtype: 'form',
                    		items: [
//	                    		{
//			                        xtype: 'displayfield',
//	                    			fieldLabel: '文物(ID)',
//			                        allowBlank: true,
//			                        bind: '{theRelic.objId}',
//			                        publishes: ['value']
//			                    },
			                    {
			                        xtype: 'container',
			                        layout: 'hbox',
			                        combineErrors: true,
			                        defaultType: 'textfield',
			                        items: [DCApp.Cfg.getEditorField('登记人','{theObj.dcEditor0}'),
			                        	{
					                    	flex: 2,
					                        xtype: 'combotree',
					                        fieldLabel: '文物分类',
					                        bind: '{theObj.classa}',
					                        id : 'name',  
					                        name : 'name',  
					                        hiddenName : 'hiddenName',  
					                        emptyText :'请选择',
					                        storeUrl : '/getTreeData/Relic/classa',
					                        cascade : 'child',//级联方式:1.child子级联;2.parent,父级联,3,both全部级联  
					                        rootId : '1',  
					                        rootText : 'DRP',  
					                        treeNodeParameter : '',
					                        listeners:{
				    					    	change:function(fld,newValue, oldValue, eOpts){
				    					    		//console.info(newValue+':'+oldValue);
				    					    		//文物可以属于多个分类，扩展字段也可以属于多个分类，两者只要有一个分类符合，即显示该扩展字段，否则隐藏之
				    					    		var fm = fld.up('form');
				    					    		var scs=[];
				    					    		if(newValue.trim()!=''){
					    					    		scs=newValue.split(';');
					    					    		//取多重分类的一级分类
					    					    		for(var i=0;i<scs.length; i++){
					    					    			var pos=scs[i].indexOf('#');
					    					    			if(pos!=-1){
					    					    				scs[i]=scs[i].substring(0,pos);
					    					    			}
					    					    		}
				    					    		}
				    					    		
				    					    		var eflds = fm.query('container[hasMany]');
				    					    		for(var i=0; i<eflds.length; i++){
				    					    			var hasMany = eflds[i].hasMany;
				    					    			var bshow=false;
				    					    			for(var j=0; j<scs.length;j++){
				    					    				//某个一级分类匹配扩展字段的分类之一
				    					    				if(hasMany.indexOf(scs[j])!=-1){
				    					    					bshow=true;
				    					    					break;
				    					    				}
				    					    			}
				    					    			//均不符合,隐藏之
				    					    			if(bshow){
			    					    					eflds[i].show();
				    					    			}else
				    					    				eflds[i].hide();
				    					    		}
				    					    	},
				    					    	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
				    					    },
					                        publishes: ['value']
					                    }
			                        	/*{
			                            	flex: 1,
			                            	xtype: 'textfield',
			                        		fieldLabel: '作者(窑口)',
			                        		//allowBlank: true,
			                        		bind: '{theObj.objAuthor}',
			                        		publishes: ['value']
			                        	},
			                        	{
			                            	flex: 2,
				                            fieldLabel: '文物分类',
				                            bind: '{theObj.classa}',
				    				        xtype: 'tags',
				    				        store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','classa'),
				        		    		listConfig: {
				    					        getInnerTpl: function() {
				    					            return '<div>{name}</div>';
				    					        }
				    					    },
				    				        displayField: 'name',
				    				        valueField: 'name'
			                        	}*/
			                        ]
			                    },
			                    {
			                        xtype: 'container',
			                        layout: 'hbox',
			                        combineErrors: true,
			                        defaultType: 'textfield',
			                        items:[
			                        	{
			                        		flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '文物编号',
					                        //allowBlank: true,
					                        bind: '{theObj.objNo}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '文物名称',
					                        //allowBlank: true,
					                        bind: '{theObj.objName}',
					                        publishes: ['value']
					                    }		                        
			                        ]
			                    },
			                    {
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
			                    		{
			                    			flex: 1,
						                	//xtype: 'textfield',
					                        fieldLabel: '级别',
					                        //allowBlank: true,
					                        bind: '{theObj.grade}',
					                       // publishes: ['value']
					                       xtype: 'combobox',
					                       listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
                                           triggerAction:'all',
                                           typeAhead :true,
                                           minChars:1,
                           	               emptyText :'请选择',
                                           queryParam : 'kw',
                                           valueField: 'name',
                                           displayField: 'name',
                                           store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','grade')
					                    },
					                    {
					                    	flex: 1,
				                            fieldLabel: '文物年代',
				                            bind: '{theObj.generateEra}',
				                            xtype: 'combobox',
				                            listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','generateEra')
					                    }
			                    	]
			                    },
			                    /*{		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '备注',
					                        //allowBlank: true,
					                        bind: '{theObj.note}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '关键词',
					                        //allowBlank: true,
					                        bind: '{theObj.keywords}',
					                        publishes: ['value']
					                    }
			                    	]
			                    },*/
			                    {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
			                    	    {
			                            	flex: 2,
			                            	xtype: 'textfield',
			                        		fieldLabel: '作者',
			                        		//allowBlank: true,
			                        		bind: '{theObj.objAuthor}',
			                        		publishes: ['value']
			                        	},
					                    DCApp.Cfg.getAuthorField('撰稿人','{theObj.docAuthor}')
					                    //DCApp.Cfg.getEditorField('登记人','{theObj.dcEditor0}')
				                    	
			                    	]
			                    },
			                    /*{		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',			                    	
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'datefield',
					                        fieldLabel: '展出起始时间',
					                        //allowBlank: true,
					                        format: 'Y-m-d',
					                        bind: '{theObj.showFrom}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'datefield',
					                        fieldLabel: '展出截止时间',
					                        //allowBlank: true,
					                        format: 'Y-m-d',
					                        bind: '{theObj.showTo}',
					                        publishes: ['value']
					                    }
			                    	]
			                    },*/
			                   /* {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '公元纪年',
					                       // allowBlank: true,
					                        bind: '{theObj.era}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '材质',
					                        //allowBlank: true,
					                        bind: '{theObj.material}',
					                        xtype: 'combobox',
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	lazyInit:false,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				 				          	typeAhead :true,
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','material')
					                        //publishes: ['value']
					                    }
			                    	]
			                    },
			                    {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '用色方式',
					                        //allowBlank: true,
					                        bind: '{theObj.colorMode}',
					                        xtype: 'combobox',
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	lazyInit:false,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				 				          	typeAhead :true,
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','colorMode')
					                       // publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '尺寸',
					                        allowBlank: true,
					                        bind: '{theObj.objsize}',
					                        xtype: 'combobox',
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	lazyInit:false,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				 				          	typeAhead :true,
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','objsize')
					                        //publishes: ['value']
					                    }
			                    	]
			                    },
			                    {
                                     xtype: 'container',
                                     layout: 'hbox',
                                     combineErrors: true,
                                     defaultType: 'textfield',
                                     items:[
                        		{
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '展出地点',
					                        //allowBlank: true,
					                        bind: '{theObj.showLocation}',
					                        xtype: 'combobox',
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	lazyInit:false,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				 				          	typeAhead :true,
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','showLocation')
					                        //publishes: ['value']
					                    },
		                    { 
                        	flex: 1,
                            fieldLabel: '正文字数',
                            name:'dcTxtwords',
                            bind: '{theObj.dcTxtwords}',
                            xtype: 'numberfield'
                     }
                		]
            		},*/
			        {

                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items: [
                        DCApp.Cfg.getUserField('初审','{theObj.dcEditor1}'),
                        DCApp.Cfg.getUserField('终审','{theObj.dcEditor2}')]
                     },
                     {  
	                        xtype: 'fileupload',
	                        name: 'file1',
	                        fieldLabel: '文稿上传',
	                        height:'auto!important',
	                        bind: '{theObj.dcDraft}',
	                        listeners:{
	                        	'uploaded':DCApp.Cfg.parseWord
	                        }
	                        
	                    },
	                    {
                             xtype: 'container',
                             layout: 'hbox',
                             combineErrors: true,
                             defaultType: 'textfield',
                             items:[  
		                             { 
                        	           flex: 1,
                                       fieldLabel: '正文字数',
                                       //width:916,
                                       name:'dcTxtwords',
                                       bind: '{theObj.dcTxtwords}',
                                       xtype: 'numberfield'
                                         },{ 
                        	           flex: 1,
                                       fieldLabel: false,
                                       //width:916,
                                        xtype: 'displayfield'
                                         }
                		              ]
            		        },
	                    	{
			            	xtype: 'htmleditor',
			            	 plugins:[{ptype: 'word'}],
			            	bind: {
			                    value: '{theObj.description}'
			                },
			            	//bind: '{theObj.description}',
			            	defaultValue :'',
			            	enableColors: false,
			                enableAlignments: false,
			                enableSourceEdit:false,
			            	publishes: ['value'],
			            	fieldLabel: '正文'
			               },
                     {

                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        width: 20,
                        height: 20,
                        items: []
                     },

			               {
	                        xtype: 'fieldset',
	                        title: '扩展信息',
	                        defaults: {
	                        labelWidth: 89,
	                        anchor: '100%',
	                        layout: {
	                             type: 'hbox',
	                            defaultMargins: {top: 0, right: 5, bottom: 0, left: 0}
	                            }                         }, items:[           		
            		           
	                         
	                         {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '公元纪年',
					                       // allowBlank: true,
					                        bind: '{theObj.era}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','era')
					                        //publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '材质',
					                        //allowBlank: true,
					                        bind: '{theObj.material}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','material')
					                        //publishes: ['value']
					                    }
			                    	]
			                    },
			                    {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',		                    	
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    /*{
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '用色方式',
					                        //allowBlank: true,
					                        bind: '{theObj.colorMode}',
					                        xtype: 'combobox',
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','colorMode')
					                       // publishes: ['value']
					                    },*/
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '尺寸',
					                        bind: '{theObj.objsize}',
					                        publishes: ['value']
					                    },
					                    { 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]},
					                 {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	hidden:true,
			                    	hasMany:'陶瓷',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '窑口',
					                        //allowBlank: true,
					                        bind: '{theObj.dcKilns}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','dcKilns')
					                       // publishes: ['value']
					                    }, { 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]} ,
					                 {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	hidden:true,
			                    	hasMany:'绘画',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        fieldLabel: '用色方式',
					                        bind: '{theObj.colorMode}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
					                        autoSelect:false,
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','colorMode')
					                    }, { 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]} ,
					                 {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	hidden:true,
			                    	hasMany:'法书',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '书体',
					                        //allowBlank: true,
					                        bind: '{theObj.dcChirography}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','dcChirography')
					                       // publishes: ['value']
					                    } ,{ 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]},
					                  {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	hidden:true,
			                    	hasMany:['钟表仪器','宫廷宗教','外国文物'],
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '产地',
					                        //allowBlank: true,
					                        bind: '{theObj.dcOriginplace}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','dcOriginplace')
					                       // publishes: ['value']
					                    }, { 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]},
					                 {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	hidden:true,
			                    	hasMany:'玉石器',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '文化类型',
					                        //allowBlank: true,
					                        bind: '{theObj.dcCulturaltype}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','dcCulturaltype')
					                       // publishes: ['value']
					                    }, { 
                        	                flex: 1,
                                            fieldLabel: false,
                                            xtype: 'displayfield'
                                         }
					                 ]}
					                 
			                    
                       ]},
                       {

                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        width: 20,
                        height: 20,
                        items: []
                     },
			               	{
	                        xtype: 'fieldset',
	                        title: '更多信息',
	                        collapsible: true,
	                        collapsed:true,
	                        defaults: {
	                        labelWidth: 89,
	                        anchor: '100%',
	                        layout: {
	                             type: 'hbox',
	                             defaultMargins: {top: 0, right: 5, bottom: 0, left: 0}
	                            }
	                         }, items:[   
	                           {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'numberfield',
					                        fieldLabel: '起始年代',
					                        //allowBlank: true,
					                        bind: '{theObj.eraBegin}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'numberfield',
					                        fieldLabel: '终止年代',
					                        //allowBlank: true,
					                        bind: '{theObj.eraEnd}',
					                        publishes: ['value']
					                    }
			                    	]
			                    },
            		           {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',			                    	
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'datefield',
					                        fieldLabel: '展出起始时间',
					                        //allowBlank: true,
					                        format: 'Y-m-d',
					                        bind: '{theObj.showFrom}',
					                        publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'datefield',
					                        fieldLabel: '展出截止时间',
					                        //allowBlank: true,
					                        format: 'Y-m-d',
					                        bind: '{theObj.showTo}',
					                        publishes: ['value']
					                    }
			                    	]
			                    },
			                     {
                                     xtype: 'container',
                                     layout: 'hbox',
                                     combineErrors: true,
                                     defaultType: 'textfield',
                                     items:[
                        		         {
					                    	flex: 1,
					                        //xtype: 'textfield',
					                        fieldLabel: '展出地点',
					                        //allowBlank: true,
					                        bind: '{theObj.showLocation}',
					                        xtype: 'combobox',
					                        listeners:{
					                        	focus:function( fld, evt, eOpts ){
					                        		fld.onTriggerClick();
					                        	}
					                        },
				                            triggerAction:'all',
				                            typeAhead :true,
				                           	minChars:1,
				                           	emptyText :'请选择',
				                            queryParam : 'kw',
				                            valueField: 'name',
				                            displayField: 'name',
				                            store: DCApp.Cfg.getDistinctStore('com.cl.entity.Relic','showLocation')
					                        //publishes: ['value']
					                    },
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '关键词',
					                        //allowBlank: true,
					                        bind: '{theObj.keywords}',
					                        publishes: ['value']
					                    }
                		              ]
            		            },
			                    {		                    	
			                    	xtype: 'container',
			                    	layout: 'hbox',
			                    	combineErrors: true,
			                    	defaultType: 'textfield',
			                    	items: [
					                    {
					                    	flex: 1,
					                        xtype: 'textfield',
					                        fieldLabel: '备注',
					                        //allowBlank: true,
					                        bind: '{theObj.note}',
					                        publishes: ['value']
					                    }
			                    	]
			                    }
			                    
                       ]}
		           ]            
                  },
						{
		                    title: '相关影像',
		                    margin: '0 0 10 0',
		                    cls:'nav_pos',
		                    layout:'fit',
		                    items:[{
		                    	bind: '{theObj.images}',
		                    	xtype:'imgpanel',
		                    	btns:['关联','删除']
		                    }]                    
		                }]
    }]
});
